<!-- 企业端首页 -->
<template>
  <view class="content">
    <view class="tile">
	  <text class="tile_company">深圳市前海泽金产融科技有限公司</text>
	  <text class="tile_name">张三</text>
    </view>
    <view class="list">
		<view class="news_list">
			<view class="news_list_box" v-for="(item,index) in newsList" :key="index" @tap="goInquire(item)">
				<uni-badge class="uni-badge-left-margin" :text="item.Number" absolute="rightTop" :offset="[7, 7]" size="normal">
				  <img class="news_img" :src="item.img" alt="" />
				</uni-badge>
				<text class="news_text">{{item.name}}</text>
			</view>
		</view>
		<view class="navigation">
			<uni-segmented-control class="navigation_list navigation_control" :current="current" :values="items" style-type="text" @clickItem="onClickItem" />
			<view class="navigation_content">
				<view v-if="current === 0" class="navigation_content_box">
					<image src="/static/index/backgroundImg.png" mode=""></image>
					<view>
						<view class="navigation_content_ent">
							<text class="navigation_content_loans">经销贷</text>
							<text class="navigation_content_text">核心企业名称：极鲜味业</text>
						</view>
						<view class="navigation_content_limit_box">
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信额度（元）</text>
								<text class="navigation_content_limit_money">1610万</text>
							</view>
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信年化利率</text>
								<text class="navigation_content_limit_interest">3.32%</text>
							</view>
						</view>
						<view class="navigation_content_limit_botton" @tap="quotaApply">
							<text>额度申请</text>
						</view>						
					</view>
				</view>
				<view v-if="current === 1" class="navigation_content_box">
					<image src="/static/index/backgroundImg.png" mode=""></image>
					<view>
						<view class="navigation_content_ent">
							<text class="navigation_content_loans">经销贷</text>
							<text class="navigation_content_text">核心企业名称：海天味业</text>
						</view>
						<view class="navigation_content_limit_box">
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">授信额度/可用额度（元）</text>
								<text class="navigation_content_limit_money">600万/500万</text>
							</view>
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信年化利率</text>
								<text class="navigation_content_limit_interest">3.0%</text>
							</view>
						</view>
						<view class="quotaDate">
							<text>额度有效期：2023-12-01至2024-06-11</text>
						</view>
						<view class="navigation_content_limit_botton" @tap="goPSBCDraw">
							<text>提款申请</text>
						</view>						
					</view>
				</view>
				<view v-if="current === 2" class="navigation_content_box">
					<image src="/static/index/backgroundImg.png" mode=""></image>
					<view>
						<view class="navigation_content_ent">
							<text class="navigation_content_loans">经销贷</text>
							<text class="navigation_content_text">核心企业名称：海天味业</text>
						</view>
						<view class="navigation_content_limit_box">
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">授信额度/可用额度（元）</text>
								<text class="navigation_content_limit_money">600万/500万</text>
							</view>
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信年化利率</text>
								<text class="navigation_content_limit_interest">3.0%</text>
							</view>
						</view>
						<view class="quotaDate">
							<text>额度有效期：2023-12-01至2024-06-11</text>
						</view>
						<view class="navigation_content_limit_botton" @tap="goCRBCraw">
							<text>提款申请</text>
						</view>					
					</view>
				</view>
				<view v-if="current === 3" class="navigation_content_box">
					<image src="/static/index/backgroundImg.png" mode=""></image>
					<view>
						<view class="navigation_content_ent">
							<text class="navigation_content_loans">经销贷</text>
							<text class="navigation_content_text">核心企业名称：海天味业</text>
						</view>
						<view class="navigation_content_limit_box">
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">授信额度/可用额度（元）</text>
								<text class="navigation_content_limit_money">600万/500万</text>
							</view>
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信年化利率</text>
								<text class="navigation_content_limit_interest">3.0%</text>
							</view>
						</view>
						<view class="quotaDate">
							<text>额度有效期：2023-12-01至2024-06-11</text>
						</view>
						<view class="navigation_content_limit_botton" @tap="drawMoneyApply">
							<text>提款申请</text>
						</view>
					</view>
				</view>
				<view v-if="current === 4" class="applying">
					<image src="/static/index/map1.png" mode=""></image>
					<view>
						<view class="navigation_content_ent">
							<text class="navigation_content_loans">经销贷</text>
							<text class="navigation_content_text">核心企业名称：海天味业</text>
						</view>
						<view class="navigation_content_limit_box">
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信额度（元）</text>
								<text class="navigation_content_limit_money">60.0万</text>
							</view>
							<view class="navigation_content_limit_tile">
								<text class="navigation_content_limit_text">预授信年化利率</text>
								<text class="navigation_content_limit_interest interest">3.0%</text>
							</view>
						</view>
						<view class="navigation_content_limit_botton limit_botton_color">
							<text>申请中</text>
						</view>						
					</view>
				</view>
			</view>
		</view>
		<view class="advantage_box">
			<uni-section class="advantage_tile" titleFontSize="32" title="我们的优势" type="line"></uni-section>
			<view class="advantage_list">
				<view class="advantage_img">
					<view class="advantage_list_itme partyLedge">
						<text>大平台</text>
						<view>具有合法资质</view>
					</view>
					<view class="advantage_list_itme account">
						<text>到账快</text>
						<view>最快2分钟到账</view>
					</view>
				</view>
                <view class="advantage_img">
				  <view class="advantage_list_itme threshold">
					<text>门槛低</text>
					<view>无抵质押，无保证金</view>
				  </view>
				  <view class="advantage_list_itme limit">
					<text>额度高</text>
					<view>覆盖订单平均金额</view>
				  </view>  	
                </view>
			</view>
		</view>
	</view>
  </view>
</template>

<script>
  export default {
    onLoad() {
    },
    onUnload() {
    },
    data() {
      return {
		  newsList: [
			  {
				  img: '/static/index/edu.png',
				  Number: 4,
				  name: '额度'
			  },
			  {
				  img: '/static/index/rongzi.png',
				  Number: 10,
				  name: '融资'
			  },
			  {
				  img: '/static/index/huankuai.png',
				  Number: 8,
				  name: '还款'
			  },
			  
		  ],
		  items: ['中国银行','微众银行','邮储银行','中信银行','招商银行'],
		  current: 0
      };
    },
    computed: {
    
    },
    onUnload() {
    },
    methods: {
	  onClickItem(index) {
		 if (this.current !== index.currentIndex) {
			 this.current = index.currentIndex;
		 }
	  },
	  // 额度申请
	  quotaApply() {
		uni.navigateTo({
			url: '/pages/clt/quotaApply'
		});
	  },
	  // 提款申请
	  drawMoneyApply() {
		uni.navigateTo({
			url: '/pages/clt/drawApply'
		});
	  },
	  // 邮储提款申请
	  goPSBCDraw() {
		uni.navigateTo({
			url: '/pages/clt/PSBCDraw'
		});  
	  },
	  // 华润银行提款申请
	  goCRBCraw() {
		  uni.navigateTo({
		  	url: '/pages/clt/CRBCraw'
		  }); 
	  },
	  // 融资查询, 还款查询
	  goInquire(itme) {
		if (itme.name == '融资') {
		   uni.navigateTo({
		     url: '/pages/clt/financingQuery'
		   });
		}
		if (itme.name == '还款') {
		   uni.navigateTo({
			  url: '/pages/clt/repayQuery'
		   });
		}
		if (itme.name == '额度') {
		   uni.navigateTo({
			  url: '/pages/clt/creditQuery'
		   });
		}
	  }
    }
  }
</script>

<style>
  .content {
    display: flex;
    flex-direction: column;
	height: 100%;
	overflow: hidden;
  }
  .list {
    display: flex;
    flex-direction: column;
    padding-left: 25rpx;
    padding-right: 25rpx;
  }
  .tile {
	  height: 74rpx;
	  background: #FFFFFF;
	  line-height: 74rpx;
  }
  .tile_company {
	  font-size: 28rpx;
	  margin-left: 50rpx;
	  color: #333333;
	  font-weight: 600;
  }
  .tile_name {
	  font-size: 28rpx;
	  margin-left: 40rpx;
	  color: #333333;
	  font-weight: 400;
  }
  .news_list {
	  height: 260rpx;
	  width: 100%;
	  background: #FFFFFF;
	  border-radius: 16rpx;
	  margin-top: 25rpx;
	  display: flex;
	  justify-content: space-around;
  }
  .news_list_box {
	  display: flex;
	  flex-direction: column;
	  justify-content: center;
	  align-items: center;
  }
  .news_img {
	  height: 128rpx;
	  width: 128rpx;
  }
  .news_text {
	  font-size: 32rpx;
	  color: #333333;
	  font-weight: 400;
	  margin-top: 20rpx;
  }
  .navigation {
	  height: 563rpx;
	  border-radius: 16rpx;
	  background: #FFFFFF;
	  margin-top: 26rpx;
  }
  .navigation_list {
	  height: 98rpx;
	  background-image: linear-gradient(180deg, #F7F9FE 0%, #D2E8FE 100%);
	  border-radius: 16rpx 16rpx 0rpx 0rpx;
  }
  .navigation_control {
	  padding-top: 5rpx;
	  height: 98rpx;
  }
  .navigation_content_box {
	  position: relative;
	  display: flex;
	  flex-direction: column;
	  justify-content: center;
	  align-items: center;
	  border-radius: 16rpx;
	  height: 465rpx;
  }
  .navigation_content_box view{
  	  z-index: 999;
  }
  .navigation_content_box image{
	  position: absolute;
  	  height: 465rpx;
	  width: 100%;
	  margin-top: 98rpx;
  }
  .applying {
	  position: relative;
  	  display: flex;
  	  flex-direction: column;
  	  justify-content: center;
  	  align-items: center;
  	  border-radius: 16rpx;
  	  height: 465rpx;
  }
  .applying view{
  	  z-index: 999;
  }
  .applying image{
  	  position: absolute;
  	  height: 465rpx;
  	  width: 100%;
	  margin-top: 98rpx;
  }
  .interest {
    color: #999999 !important;
  }
  .navigation_content_ent {
	display: flex;
	justify-content: space-around;
	align-items: center;
	width: 100%;
	margin-top: 30rpx;
  }
  .navigation_content_loans {
	  font-size: 42rpx;
	  color: #333333;
	  font-weight: 400;
  }
  .navigation_content_text {
	  font-size: 28rpx;
	  color: #333333;
	  font-weight: 400;
  }
  .navigation_content_limit_box {
	  display: flex;
	  justify-content: center;
	  width: 100%;
	  margin-top: 60rpx;
  }
  .navigation_content_limit_tile {
	  display: flex;
	  flex-direction: column;
	  align-items: center;
  }
  .navigation_content_limit_text {
	  font-size: 28rpx;
	  color: #666666;
	  font-weight: 400;
	  margin: 0rpx 35rpx;
  }
  .navigation_content_limit_money {
	  font-size: 48rpx;
	  color: #000000;
	  font-weight: 600;
	  margin-top: 10rpx;
  }
  .navigation_content_limit_interest {
	  font-size: 48rpx;
	  color: #315EFB;
	  font-weight: 600;
	  margin-top: 10rpx;
  }
  .navigation_content_limit_botton {
	  margin-top: 40rpx;
	  display: flex;
	  justify-content: center;
  }
  .navigation_content_limit_botton text {
	  width: 300rpx;
	  height: 70rpx;
	  display: inline-block;
	  background: #315EFB;
	  border-radius: 46px;
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  font-size: 34rpx;
	  color: #FFFFFF;
	  letter-spacing: 0;
	  font-weight: 400;
  }
  .limit_botton_color text{
	background: #7F8DA0 !important;
	border-radius: 46rpx;
  }
  .advantage_box {
	  height: 500rpx;
	  width: 100%;
      background: #FFFFFF;
      border-radius: 16rpx;
	  margin-top: 50rpx;
	  margin-bottom: 300rpx;
  }
  .quotaDate {
	  margin-top: 15rpx;
	  text-align: center;
	  font-size: 28rpx;
	  color: #666666;
	  font-weight: 400;
  }
  .advantage_tile {
	  font-size: 32rpx;
	  color: #000000;
	  font-weight: 500;
	  border-radius: 16rpx;
	  margin-left: 12rpx;
  }
  .advantage_list {
      display: flex;
	  flex-direction: column;
	  justify-content: center;
	  align-items: center;
  }
  .advantage_img {
	  display: flex;
  }
  .advantage_list_itme {
	  width: 307rpx;
	  height: 140rpx;
	  display: flex;
	  margin: 10rpx;
	  flex-direction: column;
	  justify-content: center;
	  border-radius: 16rpx;
  }
  .advantage_list_itme text {
	  margin-left: 20rpx;
	  font-size: 30rpx;
	  color: #333333;
	  font-weight: 600;
  }
 .advantage_list_itme view {
	 margin-left: 20rpx;
	 font-size: 24rpx;
	 color: #666666;
	 font-weight: 400;
	 margin-top: 10rpx;
 } 
  .partyLedge {
	  width: 307rpx;
	  height: 140rpx;
	  background-image: url('/static/index/partyLedge.png');
	  background-repeat: round;
  }
  .account {
	  width: 307rpx;
	  height: 140rpx;
	  background-image: url('/static/index/account.png');
	  background-repeat: round;
  }
  .threshold {
	 width: 307rpx;
	 height: 140rpx;
	 background-image: url('/static/index/threshold.png');
	 background-repeat: round;
  }
  .limit {
	 width: 307rpx;
	 height: 140rpx;
	 background-image: url('/static/index/limit.png');
	 background-repeat: round;
  }
</style>